﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace PubSubGeneric
{
    public interface ISubscriptionService
    {
        ISubscriptionCatalog SubscriptionCatalog { get; set; }

        void Subscribe<T>(string topic, ISubscriber<T> subscriber);
        void Subscribe<T>(string topic, ISubscriber<T> subscriber, Expression<Func<T, bool>> predicate);

        void UnSubscribe<T>(string topic, ISubscriber<T> subscriber);
        void UnSubscribe<T>(string topic, ISubscriber<T> subscriber, Expression<Func<T, bool>> predicate);
    }
}
